<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
          "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui"
	xmlns:f="http://java.sun.com/jsf/core">

<h:head>
	<link rel="stylesheet" href="#{facesContext.externalContext.requestContextPath}/css/style.css" type="text/css" />
	<title>#{x['faces.message.index.title']}</title>
</h:head>

<body style="background-image: url('/model-web/images/background.jpg')">

	<h:form id="loginForm" >

		<p:draggable for="loginPanel" />
		<p:panel id="loginPanel" header="#{x['faces.message.index.panel']}"
			style="width:300px; position:static; left:500px; top:150px;">

			<p:growl id="msgs" showDetail="true" />
			<p:focus context="inputUser" />

			<h:panelGrid columns="2" cellpadding="5">

				<h:outputLabel for="inputUser"
					value="#{x['faces.message.index.user']}: " />
				<p:inputText id="inputUser"
					requiredMessage="#{x['faces.message.index.user.required']}"
					value="#{userManager.username}" required="true" />

				<h:outputLabel for="inputPasswd"
					value="#{x['faces.message.index.password']}: " />
				<p:password id="inputPasswd" value="#{userManager.password}" required="true"
					requiredMessage="#{x['faces.message.index.password.required']}"/>

				<p:commandButton id="loginButton" action="#{userManager.doLogin}"
					value="#{x['faces.button.label.generic.enter']}" ajax="false" />
			</h:panelGrid>

		</p:panel>
	</h:form>
</body>
</html>


